package com.qjquestion.controller;

import com.qjquestion.domain.Customer;
import com.qjquestion.model.Result;
import com.qjquestion.service.CustomerService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/customer")
public class CustomerController {

    @Resource
    private CustomerService customerService;

    /**
     * 新增会员
     * @param entity 会员信息
     * @return
     */
    @PostMapping("insert")
    public Result insert(@RequestBody Customer entity){
        customerService.insert(entity);
        return Result.success();
    }
}
